package com.ruoyi.basics.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 库位管理对象 wms_location
 * 
 * @author ruoyi
 * @date 2025-06-09
 */
public class WmsLocation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    @Excel(name = "ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 货主 */
    private Long ownerId;

    /** 所属仓库 */
    @Excel(name = "所属仓库")
    @ExcelProperty("所属仓库")
    private Long warehouseId;

    /** 所属库区 */
    @Excel(name = "所属库区")
    @ExcelProperty("所属库区")

    private Long areaId;

    /** 库位编码 */
    @Excel(name = "库位编码")
    @ExcelProperty("库位编码")
    private String code;

    /** 库位名称 */
    @ExcelProperty("库位名称")
    @Excel(name = "库位名称")
    private String name;

    /** 温度类型 */
    @ExcelProperty("温度类型")
    @Excel(name = "温度类型")
    private String temperatureType;

    /** 承重类型 */
    @ExcelProperty("承重类型")
    @Excel(name = "承重类型")
    private String bearingType;

    /** 用途类型 */
    @ExcelProperty("用途类型")
    @Excel(name = "用途类型")
    private String useType;

    /** 使用状态 */
    private Integer useStatus;

    /** 承载上限 */
    @Excel(name = "承载上限")
    @Min(value = 0, message = "承载上限不能小于 0")
    @Digits(integer = Integer.MAX_VALUE, fraction = 0, message = "承载上限必须是整数")
    private Long maxNum;

    /** 承载体积 */
    @DecimalMin(value = "0.00", inclusive = false, message = "承载体积不能小于 0")
    @Digits(integer = Integer.MAX_VALUE, fraction = 2, message = "承载体积需保留 2 位小数")
    private BigDecimal maxVolume;

    /** 承载重量 */
    @DecimalMin(value = "0.00", inclusive = false, message = "承载重量不能小于 0")
    @Digits(integer = Integer.MAX_VALUE, fraction = 2, message = "承载重量需保留 2 位小数")
    private BigDecimal maxWeight;

    /** 排 */
    @Min(value = 1, message = "库位排不能小于1")
    @Digits(integer = Integer.MAX_VALUE, fraction = 0, message = "库位排必须是整数")
    private Long locationRow;

    /** 列 */
    @Min(value = 1, message = "库位列不能小于1")
    @Digits(integer = Integer.MAX_VALUE, fraction = 0, message = "库位列必须是整数")
    private Long locationColumn;

    /** 层 */
    @Min(value = 1, message = "库位层不能小于1")
    @Digits(integer = Integer.MAX_VALUE, fraction = 0, message = "库位层必须是整数")
    private Long locationLayer;

    /** 长 */
    @DecimalMin(value = "0.00", inclusive = false, message = "库位长不能小于 0")
    @Digits(integer = Integer.MAX_VALUE, fraction = 2, message = "库位长需保留 2 位小数")
    private BigDecimal locationLength;

    /** 宽 */
    @DecimalMin(value = "0.00", inclusive = false, message = "库位宽不能小于 0")
    @Digits(integer = Integer.MAX_VALUE, fraction = 2, message = "库位宽需保留 2 位小数")
    private BigDecimal locationWidth;

    /** 高 */
    @DecimalMin(value = "0.00", inclusive = false, message = "库位高不能小于 0")
    @Digits(integer = Integer.MAX_VALUE, fraction = 2, message = "库位高需保留 2 位小数")
    private BigDecimal locationHigh;

    /** 冻结 */
    private Integer frozen;

    /** 停用状态 */
    @Excel(name = "停用状态")
    private Integer status;

    /** 创建人id */
    private Long createUser;

    /** 创建人 */
    private String createName;

    /** 更新人id */
    private Long updateUser;

    /** 更新人 */
    private String updateName;

    /** 逻辑删除 */
    private Integer logicDel;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOwnerId(Long ownerId) 
    {
        this.ownerId = ownerId;
    }

    public Long getOwnerId() 
    {
        return ownerId;
    }

    public void setWarehouseId(Long warehouseId) 
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId() 
    {
        return warehouseId;
    }

    public void setAreaId(Long areaId) 
    {
        this.areaId = areaId;
    }

    public Long getAreaId() 
    {
        return areaId;
    }

    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setTemperatureType(String temperatureType) 
    {
        this.temperatureType = temperatureType;
    }

    public String getTemperatureType() 
    {
        return temperatureType;
    }

    public void setBearingType(String bearingType) 
    {
        this.bearingType = bearingType;
    }

    public String getBearingType() 
    {
        return bearingType;
    }

    public void setUseType(String useType) 
    {
        this.useType = useType;
    }

    public String getUseType() 
    {
        return useType;
    }

    public void setUseStatus(Integer useStatus) 
    {
        this.useStatus = useStatus;
    }

    public Integer getUseStatus() 
    {
        return useStatus;
    }

    public void setMaxNum(Long maxNum) 
    {
        this.maxNum = maxNum;
    }

    public Long getMaxNum() 
    {
        return maxNum;
    }

    public void setMaxVolume(BigDecimal maxVolume) 
    {
        this.maxVolume = maxVolume;
    }

    public BigDecimal getMaxVolume() 
    {
        return maxVolume;
    }

    public void setMaxWeight(BigDecimal maxWeight) 
    {
        this.maxWeight = maxWeight;
    }

    public BigDecimal getMaxWeight() 
    {
        return maxWeight;
    }

    public void setLocationRow(Long locationRow) 
    {
        this.locationRow = locationRow;
    }

    public Long getLocationRow() 
    {
        return locationRow;
    }

    public void setLocationColumn(Long locationColumn) 
    {
        this.locationColumn = locationColumn;
    }

    public Long getLocationColumn() 
    {
        return locationColumn;
    }

    public void setLocationLayer(Long locationLayer) 
    {
        this.locationLayer = locationLayer;
    }

    public Long getLocationLayer() 
    {
        return locationLayer;
    }

    public void setLocationLength(BigDecimal locationLength) 
    {
        this.locationLength = locationLength;
    }

    public BigDecimal getLocationLength() 
    {
        return locationLength;
    }

    public void setLocationWidth(BigDecimal locationWidth) 
    {
        this.locationWidth = locationWidth;
    }

    public BigDecimal getLocationWidth() 
    {
        return locationWidth;
    }

    public void setLocationHigh(BigDecimal locationHigh) 
    {
        this.locationHigh = locationHigh;
    }

    public BigDecimal getLocationHigh() 
    {
        return locationHigh;
    }

    public void setFrozen(Integer frozen) 
    {
        this.frozen = frozen;
    }

    public Integer getFrozen() 
    {
        return frozen;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setCreateUser(Long createUser) 
    {
        this.createUser = createUser;
    }

    public Long getCreateUser() 
    {
        return createUser;
    }

    public void setCreateName(String createName) 
    {
        this.createName = createName;
    }

    public String getCreateName() 
    {
        return createName;
    }

    public void setUpdateUser(Long updateUser) 
    {
        this.updateUser = updateUser;
    }

    public Long getUpdateUser() 
    {
        return updateUser;
    }

    public void setUpdateName(String updateName) 
    {
        this.updateName = updateName;
    }

    public String getUpdateName() 
    {
        return updateName;
    }

    public void setLogicDel(Integer logicDel) 
    {
        this.logicDel = logicDel;
    }

    public Integer getLogicDel() 
    {
        return logicDel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ownerId", getOwnerId())
            .append("warehouseId", getWarehouseId())
            .append("areaId", getAreaId())
            .append("code", getCode())
            .append("name", getName())
            .append("temperatureType", getTemperatureType())
            .append("bearingType", getBearingType())
            .append("useType", getUseType())
            .append("useStatus", getUseStatus())
            .append("maxNum", getMaxNum())
            .append("maxVolume", getMaxVolume())
            .append("maxWeight", getMaxWeight())
            .append("locationRow", getLocationRow())
            .append("locationColumn", getLocationColumn())
            .append("locationLayer", getLocationLayer())
            .append("locationLength", getLocationLength())
            .append("locationWidth", getLocationWidth())
            .append("locationHigh", getLocationHigh())
            .append("frozen", getFrozen())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createUser", getCreateUser())
            .append("createName", getCreateName())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateName", getUpdateName())
            .append("updateTime", getUpdateTime())
            .append("logicDel", getLogicDel())
            .toString();
    }
}
